﻿// <copyright file="FlowDocumentOptions.cs" company="Microsoft Corporation">
// Copyright (c) 2008 All Right Reserved
// </copyright>
// <author>Michael S. Scherotter</author>
// <email>mischero@microsoft.com</email>
// <date>2008-10-10</date>
// <summary>Flow document options</summary>

namespace Synergist.WordToXamlLibrary
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    /// <summary>
    /// The XAML type to generate
    /// </summary>
    public enum XamlType
    {
        /// <summary>
        /// Create the XAML as a WPF FlowDocument
        /// </summary>
        WPF,

        /// <summary>
        /// Create the XAML as a Silverlight StackPanel
        /// </summary>
        SilverlightStackPanel,

        /// <summary>
        /// Create the XAML as a Silverlight RichTextBox
        /// </summary>
        SilverlightRichTextBox,

        /// <summary>
        /// Windows RichTextBlock
        /// </summary>
        WindowsRichTextBlock
    }

    /// <summary>
    /// Page padding units
    /// </summary>
    public enum PagePaddingUnits
    {
        /// <summary>
        /// px (default) is device-independent units (1/96 inch per unit)
        /// </summary>
        Pixels,

        /// <summary>
        /// in is inches; 1in = 96px
        /// </summary>
        Inches
    }

    /// <summary>
    /// Options for Flow Document
    /// </summary>
    public class FlowDocumentOptions
    {
        #region Constructors
        /// <summary>
        /// Initializes a new instance of the FlowDocumentOptions class.
        /// </summary>
        public FlowDocumentOptions()
        {
            this.DropShadowSoftness = 0.1;
        }

        #endregion

        #region Properties

        /// <summary>
        /// Gets or sets drop shadow softness
        /// </summary>
        public double DropShadowSoftness { get; set; }

        /// <summary>
        /// Gets or sets drop shadow noise
        /// </summary>
        public double DropShadowNoise { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether Optimal Paragraph layout is enabled
        /// </summary>
        public bool IsOptimalParagraphEnabled { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether automatic hyphenation enabled
        /// </summary>
        public bool IsHyphenationEnabled { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the column width is flexible
        /// </summary>
        public bool IsColumnWidthFlexible { get; set; }

        /// <summary>
        /// Gets or sets Column width in pixels
        /// </summary>
        public double ColumnWidth { get; set; }

        /// <summary>
        /// Gets or sets Units for column width
        /// </summary>
        public string ColumnWidthUnits { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether to use 20 times the current font size for column width
        /// </summary>
        public bool AutoColumnWidth { get; set; }

        /// <summary>
        /// Gets or sets Page padding in pixels
        /// </summary>
        public double PagePadding { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether units for page padding
        /// </summary>
        public PagePaddingUnits PagePaddingUnits { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether auto page padding is set
        /// </summary>
        public bool AutoPagePadding { get; set; }

        /// <summary>
        /// Gets or sets the XAML type
        /// </summary>
        public XamlType XamlType { get; set; }
        #endregion
    }
}
